package com.lcy.springtest.conf;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @author lichenyang
 * @create 2021-04-16 4:11 下午
 */
public class MyImportSelector implements ImportSelector {

    /**
     * 返回值是导入到容器中的组件全类名
     * @param importingClassMetadata: 当前标注 @Import 注解的类的所有注解信息
     * @return
     */
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        return new String[]{"com.lcy.springtest.bean.Red", "com.lcy.springtest.bean.Yellow"};
    }
}
